<extend name="Public:base" />
<block name="content">
	<form id="validation-form" method="post">
    <style type="text/css">
        li{
            list-style: none;;
        }
		table{
			text-align: center;
		}
		.mytableer tbody > tr > td{
			border: none;
		}
    </style>
		<div class="table-responsive">
			<table class="table table-striped table-bordered table-hover search-form">
				<thead>
			    <th>时间：<input id="startDate" name="start_time" value="{:I('start_time')}" class="Wdate" type="text" onfocus="WdatePicker({dateFmt:'yyyy-M-d 00:00:00'})"/></label> - <input id="endDate" name="end_time" value="{:I('end_time')}" class="Wdate" type="text" onfocus="WdatePicker({dateFmt:'yyyy-M-d 00:00:00'})"/>

			    用户姓名：<input name="name" type="text" placeholder="" value="{:I('name')}" style="width:90px;" />

			    用户电话：<input name="phone" type="text" placeholder="" value="{:I('phone')}" style="width:90px;" />

						<a class="btn btn-primary btn-sm radius5" href="javascript:;" id="search" url="{:U('Order/Payment')}">查询</a>
					</th>
				</thead>
			</table>
		</div>
	</form>
	<div class="table-responsive">
		<table class="table table-striped table-bordered table-hover" id="mytable">
			<thead>
			<tr>
				<th rowspan="2" style="text-align: center;">订单编号</th>
				<th colspan="4" style="text-align: center;">资金详情</th>
				<th rowspan="2" style="text-align: center;">订单总金额(元)</th>
				<th rowspan="2" style="text-align: center;">用户信息</th>
				<th rowspan="2" style="text-align: center;">下单时间</th>
			</tr>
			<tr>
				<th style="text-align: center;">故障金额</th>
				<th style="text-align: center;">优惠券</th>
				<th style="text-align: center;">诊断费</th>
				<th style="text-align: center;">小费</th>
			</tr>
			</thead>
			<tbody>
					<volist name="payment" id="vo">
					<tr>
						<td>{$vo.repair_order_num_alias}</td>
						<td>{$vo.fault_money}</td>
						<td>{$vo.volume_price}</td>
						<td>{$vo.diagnosis_cost}</td>
						<td>{$vo.tip}</td>
						<td>{$vo.total}</td>
						<td>{$vo.user_name}<br>{$vo.phone}</td>
						<td>{$vo.set_time}</td>
						</tr>
					</volist>
					<tr>
						<td colspan="20" class="page">{$page}</td>
					</tr>
			</tbody>
		</table>
	</div>

</block>
<block name="javascript">
<script>
$(function(){

	$("#search").click(function () {
        var url = $(this).attr('url');
        var query = $('.search-form').find('input,select').serialize();
        query = query.replace(/(&|^)(\w*?\d*?\-*?_*?)*?=?((?=&)|(?=$))/g, '');
        query = query.replace(/^&/g, '');
        if (url.indexOf('?') > 0) {
            url += '&' + query;
        } else {
            url += '?' + query;
        }
        window.location.href = url;
    });

});
</script>
</block>